interface columnData {
    title: string
    dataIndex: string
    className?: string
    customRender?: (text: any, record: any, index: number) => any
}

export const columns: Array<columnData> = [
    {
        title: '主叫号码',
        dataIndex: 'callerNum'
    },
    {
        title: '路由号码',
        dataIndex: 'routeNum'
    },
    {
        title: '号码匹配最小长度',
        dataIndex: 'lenMin'
    },
    {
        title: '号码匹配最小长度',
        dataIndex: 'lenMin'
    },
    {
        title: '号码匹配最大长度',
        dataIndex: 'lenMax'
    },
    {
        title: '主叫替换规则',
        dataIndex: 'callerPattern'
    },
    {
        title: '主叫替换规则',
        dataIndex: 'callerPattern'
    },
    {
        title: '主叫替换号码',
        dataIndex: 'callerReplaceNum'
    },
    {
        title: '被叫替换规则',
        dataIndex: 'calleePattern'
    },
    {
        title: '被叫替换号码',
        dataIndex: 'calleeReplaceNum'
    },
    {
        title: '状态',
        dataIndex: 'status',
        customRender: ({text}) => {
            return statusEnum[text]
        },
    },
    {
        title: '创建时间',
        dataIndex: 'createTime'
    },
    {
        title: '创建人',
        dataIndex: 'createName'
    },
    {
        title: '修改时间',
        dataIndex: 'updateTime'
    },
    {
        title: '修改人',
        dataIndex: 'updateName'
    },
    {
        title: '操作',
        dataIndex: 'operate'
    }

]

export const statusEnum:Record<number, string> = {
    0: '未启用',
    1: '启用'
}